Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX BASE_PATH fallback assumed wrong file location #9977

Merged

Conversation

chillu
Copy link
Member

@chillu chillu commented Jun 9, 2021

The file was moved back in 2017 with 3873e4b#diff-8ce3f007bef0668c2c08320160362229abce9614025dc2a5b729d1b2b56ed3f7,
but the logic wasn't updated. That wasn't apparent since the fallback usually doesn't need to be triggered.
Whenever constants.php is included through the standard composer autoload, the debug_backtrace() logic took priority.

This is an important piece for using CoreKernel directly to boot Silverstripe,
which I'm currently attempting through a composer plugin (so a different autoloading path).
https://github.com/silverstripe/silverstripe-graphql-composer-plugin, context at silverstripe/silverstripe-graphql#388

PR against minor release branch because its a bugfix, and we might rely on this being present in a 4.8.1 release for the composer graphql plugin rollout to early adopters.

The file was moved back in 2017 with silverstripe@3873e4b#diff-8ce3f007bef0668c2c08320160362229abce9614025dc2a5b729d1b2b56ed3f7,
but the logic wasn't updated. That wasn't apparent since the fallback usually doesn't need to be triggered.
Whenever constants.php is included through the standard composer autoload, the debug_backtrace() logic took priority.

This is an important piece for using CoreKernel directly to boot Silverstripe,
which I'm currently attempting through a composer plugin (so a different autoloading path).
https://github.com/silverstripe/silverstripe-graphql-composer-plugin
chillu added a commit to silverstripe/silverstripe-graphql-composer-plugin that referenced this pull request Jun 13, 2021
There's no straightforward way to have sake run without a database connection.
When using a "fake" HTTPApplication for CLI execution, it executes middleware which rightfully assumes a database connection (e.g. fluent is getting available languages to modify routing).

Relies on silverstripe/silverstripe-framework#9977
@unclecheese unclecheese merged commit b2a85e7 into silverstripe:4.8 Jul 7, 2021
@unclecheese unclecheese deleted the pulls/4.8/fix-base-path-fallback branch July 7, 2021 23:11
xini pushed a commit to xini/silverstripe-framework that referenced this pull request Jul 20, 2021
The file was moved back in 2017 with silverstripe@3873e4b#diff-8ce3f007bef0668c2c08320160362229abce9614025dc2a5b729d1b2b56ed3f7,
but the logic wasn't updated. That wasn't apparent since the fallback usually doesn't need to be triggered.
Whenever constants.php is included through the standard composer autoload, the debug_backtrace() logic took priority.

This is an important piece for using CoreKernel directly to boot Silverstripe,
which I'm currently attempting through a composer plugin (so a different autoloading path).
https://github.com/silverstripe/silverstripe-graphql-composer-plugin
michalkleiner pushed a commit to chrometoasters/silverstripe-framework that referenced this pull request Aug 5, 2021
The file was moved back in 2017 with silverstripe@3873e4b#diff-8ce3f007bef0668c2c08320160362229abce9614025dc2a5b729d1b2b56ed3f7,
but the logic wasn't updated. That wasn't apparent since the fallback usually doesn't need to be triggered.
Whenever constants.php is included through the standard composer autoload, the debug_backtrace() logic took priority.

This is an important piece for using CoreKernel directly to boot Silverstripe,
which I'm currently attempting through a composer plugin (so a different autoloading path).
https://github.com/silverstripe/silverstripe-graphql-composer-plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants